Repository navigation
feat(writer): VortexWriter.finish() returns a WriteSummary (#664) - #707
Merged
Merged
Conversation
close() is void, so a caller had to reopen the file to learn what it wrote. finish() returns Rust's WriteSummary, as vortex-jni's VortexWriter.finish() does: the file size, the row count and, per top-level column, its compressed size and the footer's file statistics (min, max, sum, null and NaN counts, folded per batch). - The compressed size sums the column's segments (data, zone map, dictionary), Rust's compressed_column_sizes over its layout subtree. - close() calls finish() unless it ran: a second close() no longer writes a second footer. writeChunk after finish() throws, as rows would land after the trailer; a failed finish() is not retried. Cross-checked against vortex-jni's summary for the same batches (row count, null/NaN counts, bounds), and the sizes against the reopened file (WriteSummaryInteropIntegrationTest). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #664. Last of three PRs (after #705, #706).
VortexWriter.finish()returnsWriteSummary(fileSize, rowCount, columns); each column hascompressedSize(its segments, as Rust'scompressed_column_sizes) andstats(the footer's file statistics from #706, asArrayStatsfrom #705). Mirrors vortex-jni 0.90.0'sVortexWriter.finish()/VortexWriteSummary.close()=finish()unless it already ran (a secondclose()used to write a second footer).writeChunkafterfinish()throwsIllegalStateException; a failedfinish()is not retried.WriteSummaryInteropIntegrationTest: row count, null/NaN counts and bounds equal vortex-jni's summary for the same batches;fileSizeand per-column sizes match the reopened file.Naming: vortex-jni calls these
VortexWriteSummary/VortexColumnStatistics; this keeps the shorterWriteSummary(likeWriteOptions). Easy to rename if preferred.🤖 Generated with Claude Code